// test2/sort.cpp
#include "sort.h"
#include <iostream>
#include <vector>

// 示例函数，用于打印数组
void printArray(const std::vector<int>& arr) {
    for (int num : arr) {
        std::cout << num << " ";
    }
    std::cout << std::endl;
}

int main() {
    std::vector<int> arr = {64, 25, 12, 22, 11};

    std::cout << "Original array: ";
    printArray(arr);

    // 使用插入排序
    insertionSort(arr.data(), arr.size());
    std::cout << "Array after insertion sort: ";
    printArray(arr);

    // 重新初始化数组
    arr = {64, 25, 12, 22, 11};

    // 使用选择排序
    selectionSort(arr.data(), arr.size());
    std::cout << "Array after selection sort: ";
    printArray(arr);

    return 0;
}